<?php
class SendInfoTemplateController {
	public function lists(){
		return HttpServerManager::getSendInfoTemplateServer()->paging();
	}
	public function add(){
		$data = array();
		if (!empty($_GET['id'])){
			$data = HttpDaoManager::getSendInfoTemplateDao()->get($_GET['id']);
		}
		$ueditor = ClassManager::getUeditor();
		$content = Common::getStrValue($data, 'content');
		$data['ueditor'] = $ueditor->ueditor().$ueditor->ueditors('content',$content);

		$data['id'] =  Common::getGetStrValue('id');
		return $data;
	}
	public function subAdd(){
		HttpDaoManager::getSendInfoTemplateDao()->add($_POST);
		ClassManager::getToos()->msgbox('添加成功');
	}
	public function subUpdate(){
		HttpDaoManager::getSendInfoTemplateDao()->update($_POST,$_POST['id']);
		ClassManager::getToos()->msgbox('修改成功','lendInfoTemplate_lists.html');
	}
	public function delete(){
		HttpServerManager::getSendInfoTemplateServer()->deleteBatchByid($_GET['id']);
		ClassManager::getToos()->msgbox("删除成功");
	}
	
}

?>